
const TokenKey = 'yidianyunh5_token'
const userInfoKey = 'yidianyunh5_userInfo'
const StoreId = 'yidianyunh5_storeId'

export function getToken() {
  // return Cookies.get(TokenKey)
  return uni.getStorageSync(
    TokenKey
  )
}

export function setToken(token) {
  return uni.setStorageSync(TokenKey,token)
}

export function removeToken() {
  return uni.removeStorageSync(TokenKey)
}
export function getStoreId() {
  // return Cookies.get(TokenKey)
  return uni.getStorageSync(
    StoreId
  )
}

export function setStoreId(storeId) {
  return uni.setStorageSync(StoreId,storeId)
}

export function removeStoreId() {
  return uni.removeStorageSync(StoreId)
}

export function getUserInfo() {
  return uni.getStorageSync(userInfoKey) ? JSON.parse(uni.getStorageSync(userInfoKey)) :{}
}

export function setUserInfo(userInfo) {
  return uni.setStorageSync(userInfoKey,userInfo)
}

export function removeUserInfo() {
  return uni.removeStorageSync(userInfoKey)
}